Skip to content

Add support for Junie from JetBrains tool and command generation#853

Merged
TabishB merged 3 commits intoFission-AI:mainfrom
preigile:support-junie
Apr 10, 2026
Merged

Add support for Junie from JetBrains tool and command generation#853
TabishB merged 3 commits intoFission-AI:mainfrom
preigile:support-junie

Conversation

@preigile
Copy link
Copy Markdown
Contributor

@preigile preigile commented Mar 17, 2026

Added support for Junie, an AI agent from JetBrains

Summary by CodeRabbit

  • New Features
    • Junie is now available as a selectable AI tool and can be enabled via the non-interactive --tools option.
  • Documentation
    • Tool directory reference updated to include Junie and its command/skills locations.
  • Tests
    • Registry tests updated to verify the Junie adapter is registered, discoverable, and included in lookups.

@preigile preigile requested a review from TabishB as a code owner March 17, 2026 17:08
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f28eb7c7-65d8-4921-bdbf-a95aff3678ee

📥 Commits

Reviewing files that changed from the base of the PR and between 448ddf4 and 9b0950d.

📒 Files selected for processing (5)
  • docs/supported-tools.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • src/core/legacy-cleanup.ts
✅ Files skipped from review due to trivial changes (3)
  • src/core/command-generation/adapters/index.ts
  • src/core/config.ts
  • src/core/command-generation/registry.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/supported-tools.md
  • src/core/legacy-cleanup.ts

📝 Walkthrough

Walkthrough

Adds support for the Junie tool: new command adapter implementation and export, registry registration, AI_TOOLS entry, legacy command path patterns, docs update, and tests verifying adapter registration.

Changes

Cohort / File(s) Summary
Junie Adapter Implementation
src/core/command-generation/adapters/junie.ts
New junieAdapter: ToolCommandAdapter with toolId: 'junie', getFilePath(commandId) => .junie/commands/opsx-<id>.md, and formatFile(content) producing Markdown with YAML frontmatter (description) + body.
Adapter Export & Registry
src/core/command-generation/adapters/index.ts, src/core/command-generation/registry.ts
Re-exported junieAdapter and registered it in CommandAdapterRegistry so it's discoverable by key junie.
Configuration & Legacy Paths
src/core/config.ts, src/core/legacy-cleanup.ts
Added Junie to AI_TOOLS (value: 'junie', skillsDir: '.junie') and added legacy file-patterns for Junie command files in LEGACY_SLASH_COMMAND_PATHS.
Docs & Tests
docs/supported-tools.md, test/core/command-generation/registry.test.ts
Documentation updated to include junie in tool IDs and directories; tests extended to assert the registry contains the junie adapter and has('junie').

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI/Generator
    participant Registry as CommandAdapterRegistry
    participant Adapter as junieAdapter
    participant FS as FileSystem

    CLI->>Registry: request adapter for "junie"
    Registry-->>CLI: returns junieAdapter
    CLI->>Adapter: build CommandContent + commandId
    Adapter-->>CLI: filePath (".junie/commands/opsx-<id>.md") and formattedContent
    CLI->>FS: write filePath with formattedContent
    FS-->>CLI: write success
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Israel-Laguan

Poem

🐰 I stitched a Junie file so neat,

YAML frontmatter and body complete,
The registry sniffed me, “junie” declared,
Files now live where brave bunnies dared,
Hooray — new tool, a tidy feat! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the changeset: adding support for the Junie tool from JetBrains, including tool and command generation integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
test/core/command-generation/registry.test.ts (1)

24-28: Add Junie behavior assertions, not only registry presence.

Lines 24-28 and Line 63 validate registration, but they don’t verify Junie-specific path/format behavior. A broken Junie adapter implementation could still pass these tests.

Suggested test additions
@@
     it('registered adapters should have working getFilePath', () => {
       const claudeAdapter = CommandAdapterRegistry.get('claude');
       const cursorAdapter = CommandAdapterRegistry.get('cursor');
       const windsurfAdapter = CommandAdapterRegistry.get('windsurf');
+      const junieAdapter = CommandAdapterRegistry.get('junie');

       expect(claudeAdapter?.getFilePath('test')).toContain('.claude');
       expect(cursorAdapter?.getFilePath('test')).toContain('.cursor');
       expect(windsurfAdapter?.getFilePath('test')).toContain('.windsurf');
+      expect(junieAdapter?.getFilePath('test')).toContain('.junie');
+      expect(junieAdapter?.getFilePath('test')).toContain('opsx-test.md');
     });
@@
       const adapters = CommandAdapterRegistry.getAll();
       for (const adapter of adapters) {
         const output = adapter.formatFile(content);
@@
       }
+
+      const junieOutput = CommandAdapterRegistry.get('junie')?.formatFile(content) ?? '';
+      expect(junieOutput).toContain('description: Test desc');
+      expect(junieOutput).toContain('Body content');
     });

Also applies to: 63-63

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/core/command-generation/registry.test.ts` around lines 24 - 28, The test
currently only checks registry presence for CommandAdapterRegistry.get('junie');
extend it to exercise Junie-specific behavior by calling the adapter's public
formatting/build method(s) (e.g., adapter.formatCommand(...) or
adapter.buildCommand(...) — whichever the CommandAdapter interface exposes) with
a representative input and assert the returned path/format/command matches Junie
expectations (for example specific path prefix, file extension, or command
structure) in the same test block (and similarly at the other location around
line 63); keep the existing toolId assertion and add one or two focused
assertions that validate Junie-specific output so a broken Junie adapter
implementation will fail the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/supported-tools.md`:
- Line 39: Update the Junie table row to match the rest of the table convention
by adding the tool ID and concrete include/exclude patterns: replace the current
row containing "Junie | `.junie/skills/` | `.junie/commands/`" with a
four-column entry that includes the tool ID (e.g., "junie") and explicit pattern
entries (for example, include pattern like ".junie/**" and specific subfolder
patterns such as ".junie/skills/**" and ".junie/commands/**") so the Junie row
uses the same columns and concrete patterns as other tool rows.

In `@src/core/legacy-cleanup.ts`:
- Line 56: The Junie legacy cleanup entry currently uses the glob pattern
'.junie/commands/openspec-*.md' but Junie generator actually emits files named
'opsx-*.md' (see the 'junie' mapping in legacy-cleanup.ts); update the 'junie'
mapping's pattern to match the generated filenames (e.g., change to
'.junie/commands/opsx-*.md' or include both patterns) so stale Junie command
files are detected and removed by the cleanup flow.

---

Nitpick comments:
In `@test/core/command-generation/registry.test.ts`:
- Around line 24-28: The test currently only checks registry presence for
CommandAdapterRegistry.get('junie'); extend it to exercise Junie-specific
behavior by calling the adapter's public formatting/build method(s) (e.g.,
adapter.formatCommand(...) or adapter.buildCommand(...) — whichever the
CommandAdapter interface exposes) with a representative input and assert the
returned path/format/command matches Junie expectations (for example specific
path prefix, file extension, or command structure) in the same test block (and
similarly at the other location around line 63); keep the existing toolId
assertion and add one or two focused assertions that validate Junie-specific
output so a broken Junie adapter implementation will fail the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 038bb184-1c73-4298-a576-d6b5d537cc94

📥 Commits

Reviewing files that changed from the base of the PR and between afdca0d and b9aa00c.

📒 Files selected for processing (7)
  • docs/supported-tools.md
  • src/core/command-generation/adapters/index.ts
  • src/core/command-generation/adapters/junie.ts
  • src/core/command-generation/registry.ts
  • src/core/config.ts
  • src/core/legacy-cleanup.ts
  • test/core/command-generation/registry.test.ts

@preigile
Copy link
Copy Markdown
Contributor Author

Hi @TabishB can you please check if everything is ok?

@alfred-openspec alfred-openspec mentioned this pull request Apr 8, 2026
Include both `junie` and `forgecode` in the tool IDs list.
@TabishB TabishB added this pull request to the merge queue Apr 10, 2026
Merged via the queue into Fission-AI:main with commit af0b341 Apr 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants